package com.ruoyi.project.cms.pro.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.cms.pro.service.CmsProInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/pro/task")
 public class CmsProTaskController extends BaseController {
    @Autowired
    private CmsProInfoService cmsProInfoService;
    String  prefix="/cms/pro";

    @GetMapping("")
    public String task()
    {
        return  prefix+ "/task";
    }
    @GetMapping("/distribOne/{pid}")
    public String selectOne(@PathVariable("pid") Integer pid, ModelMap mmap)
    {
        mmap.put("cmsProInfo", cmsProInfoService.selectcmsProInfoById(pid));
        return prefix + "/distrib";
    }
}
